//
//  LKHomeBottomListCell.m
//  LKIntelligentVideoProject
//
//  Created by she1323 on 2018/9/27.
//  Copyright © 2018年 she1323. All rights reserved.
//




#import "LKHomeBottomListCell.h"


@interface LKHomeBottomListCell()

@property (weak, nonatomic) IBOutlet UILabel *typeLabel;
@property (weak, nonatomic) IBOutlet UIImageView *typeImageView;
@property(nonatomic,strong)YYLabel *inforsLabel;

@end

@implementation LKHomeBottomListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    YYLabel *verticalLabel = [[YYLabel alloc] init];
    verticalLabel.verticalForm = YES;
    verticalLabel.textColor = ColorRGB(109, 160, 200);
    verticalLabel.font = [UIFont systemFontOfSize:15];
    verticalLabel.textColor = [UIColor greenColor];
    [self.contentView addSubview:verticalLabel];
    [verticalLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.typeImageView);
        make.left.equalTo(self.typeImageView.mas_right).offset(10);
    }];
    NSDictionary *kernDic = @{NSKernAttributeName:@10.0f,NSFontAttributeName:[UIFont systemFontOfSize:15]};
    NSMutableAttributedString *attribu = [[NSMutableAttributedString alloc] initWithString:@"最新消息"];
    [attribu addAttributes:kernDic range:NSMakeRange(0, attribu.length)];
    verticalLabel.attributedText = attribu;
    
    self.inforsLabel = [[YYLabel alloc] init];
    self.inforsLabel.font = [UIFont systemFontOfSize:12];
    self.inforsLabel.numberOfLines = 0;
    NSMutableAttributedString *inforAttribu = [[NSMutableAttributedString alloc] initWithString:@"张嘉佳进入  2018-9-12 12:23:06\n张嘉佳进入  2018-9-12 12:23:06\n张嘉佳进入  2018-9-12 12:23:06\n张嘉佳进入  2018-9-12 12:23:06\n张嘉佳进入  2018-9-12 12:23:06"];

    NSMutableParagraphStyle *paraStyle = [[NSMutableParagraphStyle alloc] init];
    [paraStyle setLineSpacing:8.0f];
    [inforAttribu addAttribute:NSParagraphStyleAttributeName value:paraStyle range:NSMakeRange(0, inforAttribu.length)];
    self.inforsLabel.textColor = [UIColor lightGrayColor];
    [self.contentView addSubview:self.inforsLabel];
    [self.inforsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(verticalLabel.mas_right).offset(10);
        make.centerY.equalTo(self.contentView.mas_centerY);
        make.bottom.equalTo(self.contentView);
    }];
    self.inforsLabel.attributedText = inforAttribu;
    
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
